<extend name="Public/baseConf" />
<block name="breadcrumb"> 
	<div class="row wrapper border-bottom white-bg page-heading">
	    <div class="col-lg-6">
	        <h2>{$info['id']?'编辑':'新增'}配置信息 </h2>
	        <ol class="breadcrumb">
	            <li><a href="{:U('index/index')}">首页</a></li>
	            <li><a href="{:U('Config/index')}">配置管理</a></li>
	            <li class="active">
	                <strong>{$info['id']?'编辑':'新增'}配置信息</strong>
	            </li>
	        </ol>
	    </div>
	    <div class="col-lg-6">
            <div class="title-action">
 				<button class="btn btn-primary ajax-post" type="submit" target-form="form-horizontal"><i class="fa fa-check"></i>保存</button>
	            <a class="btn btn-warning" type="submit"  onclick="javascript:history.back(-1);return false;"><i class="fa fa-reply"></i>返回</a>
            </div>
        </div>
	</div>
</block>
<block name="body">
	<div class="row">
	    <div class="col-lg-12">
	        <div class="ibox float-e-margins">
	            <div class="ibox-title">
	                <h5>请在下表中填入信息<small></small></h5>
	                <div class="ibox-tools">
	                    <a class="collapse-link">
	                        <i class="fa fa-chevron-up"></i>
	                    </a>
	                </div>
	            </div>
	            <div class="ibox-content">
	                <form action="{:U()}" method="post" class="form-horizontal">
	                    <div class="form-group"><label class="col-sm-4 control-label">配置标识<br><small>（用于C函数调用，只能使用英文且不能重复）</small></label>
	                        <div class="col-sm-8"><input type="text" name="name" value="{$info.name|default=''}" class="form-control"></div>
	                    </div>
	                    <div class="hr-line-dashed"></div>
	                    <div class="form-group"><label class="col-sm-4 control-label">配置标题<br><small>（用于后台显示的配置标题）</small></label>
	                        <div class="col-sm-8"><input type="text" name="title" value="{$info.title|default=''}" class="form-control"></div>
	                    </div>
	                    <div class="hr-line-dashed"></div>
	                    <div class="form-group"><label class="col-sm-4 control-label">排序<br><small>（用于分组显示的顺序）</small></label>
	                        <div class="col-sm-8"><input type="text" name="sort" value="{$info.sort|default=0}" class="form-control"></div>
	                    </div>
	                    <div class="hr-line-dashed"></div>
	                    <div class="form-group"><label class="col-sm-4 control-label">配置类型<br><small>（系统会根据不同类型解析配置值）</small></label>
	                        <div class="col-sm-8"><select name="type" class='form-control'>
								<volist name="Think.config.CONFIG_TYPE_LIST" id="type">
									<option value="{$key}">{$type}</option>
								</volist>
							</select></div>
	                    </div>
	                    <div class="hr-line-dashed"></div>
	                    <div class="form-group"><label class="col-sm-4 control-label">配置分组<br><small>（配置分组 用于批量设置 不分组则不会显示在系统设置中）</small></label>
	                        <div class="col-sm-8"><select name="group" class='form-control'>
								<option value="0">不分组</option>
								<volist name="Think.config.CONFIG_GROUP_LIST" id="group">
									<option value="{$key}">{$group}</option>
								</volist>
							</select></div>
	                    </div>
	                    <div class="hr-line-dashed"></div>
	                    <div class="form-group"><label class="col-sm-4 control-label">配置值<br><small>（配置值）</small></label>
	                        <div class="col-sm-8"><textarea class="form-control" name="value">{$info.value|default=''}</textarea></div>
	                    </div>
	                    <div class="hr-line-dashed"></div>
	                    <div class="form-group"><label class="col-sm-4 control-label">配置项<br><small>（如果是枚举型 需要配置该项）</small></label>
	                        <div class="col-sm-8"><textarea class="form-control" name="extra">{$info.extra|default=''}</textarea></div>
	                    </div>
	                    <div class="hr-line-dashed"></div>
	                    <div class="form-group"><label class="col-sm-4 control-label">说明<br><small>（配置详细说明）</small></label>
	                        <div class="col-sm-8"><textarea class="form-control" name="remark">{$info.remark|default=''}</textarea></div>
	                    </div>
	                    <div class="hr-line-dashed"></div>
						<input type="hidden" name="id" value="{$info.id|default=''}">
	                </form>
	            </div>
	        </div>
	    </div>
	</div>
</block>

<block name="script">
	<script type="text/javascript">
		Think.setValue("type", {$info.type|default=0});
		Think.setValue("group", {$info.group|default=0});
		//导航高亮
		highlight_subnav('{:U('Config/index')}');
	</script>
</block>
